package bocchi.card;

import bocchi.base.BaseCustomCard;
import bocchi.BocchiCore;
import com.megacrit.cardcrawl.actions.common.GainEnergyAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class Proud extends BaseCustomCard {
    private static final String RAW_ID = Proud.class.getSimpleName();
	public static final String GAME_ID = BocchiCore.getGameID(RAW_ID);

    public Proud() {
        super(RAW_ID);
    }

    @Override
    public void use(AbstractPlayer player, AbstractMonster monster) {
        int count = 0;
        for (AbstractCard card : AbstractDungeon.actionManager.cardsPlayedThisTurn) {
            if (card.type == CardType.ATTACK) {
                count++;
            }
        }

        addToBot(new GainEnergyAction(count));
    }
}
